<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Spaz</title>

<script type="text/javascript" src="/assets/AIRAliases.js"></script>

<script src="assets/spaz.file.js"   type="text/javascript"></script>
<script src="assets/spaz.debug.js"  type="text/javascript"></script>
<script src="assets/spaz.info.js"   type="text/javascript"></script>
<script src="assets/spaz.prefs.js"  type="text/javascript"></script>
<script src="assets/spaz.update.js" type="text/javascript"></script>
<script src="assets/spaz.bridge.js" type="text/javascript"></script>
<script src="assets/spaz.menus.js" type="text/javascript" charset="utf-8"></script>


<!-- Firebug lite -->
<script language="javascript" type="text/javascript" src="assets/firebug/firebug.js"></script>



</head>

<body onload="startApp();">
</body>
</html>
<script>

function startApp() {
	
	var prefs = Spaz.Prefs.loadForStart();
	
	// for (var i in prefs) {
	// 	air.trace(i + ":" + prefs[i]);
	// }
	// 
	
	var options = new air.NativeWindowInitOptions();
	options.systemChrome = "none";
	options.transparent = true;
	
	// we use a lightweight window to have the app not show in the taskbar
	if (prefs.minimizeToSystray && air.Shell.supportsSystemTrayIcon) {
		options.type = "utility";
	}
	
	var windowBounds = new air.Rectangle(200,250,300,400);
	newWindow = window.runtime.flash.html.HTMLControl.createRootWindow(true, options, true, windowBounds);
	newWindow.load(new runtime.flash.net.URLRequest("root.html"));
}

</script>